﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.stats.helpers {
    import flash.events.*;
    import Engine.Init.*;
    import Modules.stats.*;

    public class LoginStatsHelper extends AbstractStatsHelper {

        private var m_initializationManager:InitializationManager;

        public function LoginStatsHelper(_arg1:InitializationManager){
            this.m_initializationManager = _arg1;
        }
        override public function init():void{
            if (this.m_initializationManager.haveAllCompleted()){
                this.processInitializationComplete();
            } else {
                this.m_initializationManager.addEventListener(Event.COMPLETE, this.initializationCompleteHandler);
            };
        }
        private function processInitializationComplete():void{
            var _local1:Object;
            var _local2:IStatsTarget;
            var _local3:String;
            for (_local1 in m_statsTargets) {
                _local2 = (_local1 as IStatsTarget);
                _local3 = (m_statsTargets[_local2] as String);
                process(_local2, _local3);
            };
        }
        private function initializationCompleteHandler(_arg1:Event):void{
            var _local2:InitializationManager = (_arg1.target as InitializationManager);
            _local2.removeEventListener(Event.COMPLETE, this.initializationCompleteHandler);
            this.processInitializationComplete();
        }

    }
}//package Modules.stats.helpers 
